<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.Collection"%>
<%@ page import="icst.cyber.hrm.bo.JobBO"%>
<%@page import="icst.cyber.hrm.dto.JobDTO"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>

<%
JobBO jobBO = new JobBO();
int id = Integer.parseInt(request.getParameter("id"));
JobDTO jobDTO = jobBO.getOneJob(id);
request.setAttribute("jobDTO", jobDTO);

// Kiem tra edit
%>


<script type="text/javascript">
    function SubmitForm(){
    	var form = document.frmJob;
        form.action = "JobAction";
        form.submit();
    }

    function CancelForm(){
        window.location = "Manager.do?opt=config&task=job";
    }
</script>

<div class="section">
    <div class="title_wrapper">
        <h2>Delete Job</h2>
        <ul class="section_menu">
            <li></li>
            <li><a href="Manager.do?opt=config&task=job" class="active"><span><span>Back</span></span></a></li>
            <li></li>
            <li></li>
        </ul>
        <span class="title_wrapper_left"></span>
        <span class="title_wrapper_right"></span>
    </div>

    <div class="section_content">
        <div class="sct">
            <div class="sct_left">
                <div class="sct_right">
                    <div class="sct_left">
                        <div class="sct_right">
                            <form name="frmJob" action="#" class="search_form general_form" method="post">
                                <fieldset>
                                    <div class="forms">
                                        <div class="row">
                                            <label>Job Id:</label>
                                            <div class="inputs">
                                                <span class="input_wrapper"><input class="text" type="text" value="<%= jobDTO.getId() %>" disabled/></span>
                                            </div>
                                        </div>

                                         <div class="row">
                                            <label>Job Name:</label>
                                            <div class="inputs">
                                                <span class="input_wrapper"><input class="text" type="text" value="<%= jobDTO.getName() %>" disabled/></span>
                                            </div>
                                        </div>
                                            
                                        <div class="row">
                                            <div class="buttons">
                                                <ul>
                                                    <li><span class="button send_form_btn"><span><span>DELETE</span></span><input name="OK" type="button" onclick="return SubmitForm();"/></span></li>
                                                    <li><span class="button cancel_btn"><span><span>CANCEL</span></span><input name="Cancel" type="button" onclick="return CancelForm();"/></span></li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </fieldset>
                                <input type="hidden" name="hideId" value="<%= jobDTO.getId() %>"/>
                                <input type="hidden" name="act" value="delete"/>
                            </form>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <span class="scb"><span class="scb_left"></span><span class="scb_right"></span></span>

    </div>
</div>